package com.time.concurrency.one;

/**
 * @program: tes
 * @description:实现方法内部声明一个变量时，是不存在“非线程安全”问
 * @author: xuejingjing
 * @create: 2021-10-21 11:53
 **/
public class VarINMethodThreadB extends Thread{

    private HasSelfPrivateNum hasSelfPrivateNum;

    public VarINMethodThreadB(HasSelfPrivateNum hasSelfPrivateNum) {
        this.hasSelfPrivateNum = hasSelfPrivateNum;
    }

    @Override
    public void run() {
        super.run();
        hasSelfPrivateNum.addI("b");

    }
}
